home *** CD-ROM | disk | FTP | other *** search
Gui4CLI script | 1999-05-14 | 2.0 KB | 76 lines |
- G4C
-
- ; ---- One window has a button which allows you to open another window.
- ; The second window really is a separate gui in its own right.
- ; It could have been handled in its own separate script, but
- ; here it serves as an example of using the NEWFILE command,
- ; which allows the script for the second gui to be contained
- ; within the file you are now reading.
- ; See below under NEWFILE.
-
- WinBig 100 -1 200 150 "Window.gc"
- WinType 11110001
-
- BOX 0 0 0 0 OUT RIDGE
-
- xonLoad
- ; ----- The second button and the instructions are a
- ; distraction until the second window has been
- ; opened, so we hide them till needed.
- setgad Window.gc 1/5 HIDE
- GuiLoad Work:Tutorial/Window2.gc
- GuiOpen Window.gc
-
- xonClose
- ; ---- We quit both guis
- GuiQuit Window2.gc
- GuiQuit Window.gc
-
- Text 20 25 160 12 "It's hot in here ..." 22 NOBOX
-
- xButton 20 40 160 12 'Open another Window'
- ; ---- open the other gui
- GuiOpen Window2.gc
- ; ---- As soon as the second window has been opened,
- ; the other button and the instructions need to
- ; be seen, and so we show them.
- setgad Window.gc 1/5 SHOW
- Redraw Window.gc
-
- xButton 38 120 104 12 'Now close it'
- gadid 1
- GuiClose Window2.gc
- setgad Window.gc 1 HIDE
- Redraw Window.gc
-
- Text 10 60 100 12 'Have a good look at' 20 NOBOX
- gadid 2
- Text 10 70 100 12 'the script. This is' 20 NOBOX
- gadid 3
- Text 10 80 100 12 'a bit more complicated' 23 NOBOX
- gadid 4
- Text 10 90 100 12 'than it looks.' 14 NOBOX
- gadid 5
-
-
- ; ==================================================================
- ; - THIS IS ANOTHER GUI - the new window, using the NEWFILE command
- ; ==================================================================
-
- NEWFILE Window2.gc
-
- WinBig 310 -1 200 50 "Window2.gc" ; Size, position, title
- WinType 11110001 ; System gadgets, etc
-
- ; xonLoad
- ; NOTE - we can not have an xOnLoad command here, since this is a
- ; multi-gui file.. *Only* the xOnLoad commands of the 1st gui
- ; will be executed! - All other events are allowed though..
-
-
- Text 10 20 160 12 "I'm his kid brother..." 24 NOBOX
-
-
-
-
-